/*
 * ExplodedBalloon.h
 *
 *  Created on: 2012/07/13
 *      Author: Weihe
 */

#ifndef EXPLODEDBALLOON_H_
#define EXPLODEDBALLOON_H_

#include "Drawable.h"
#include "DrawList.h"
#include "utility.h"

namespace object {

class ExplodedBalloon: public object::Drawable {
	DrawList *trailList;
	Vector4f position;
	Vector4f direction;
	float alpha;
public:
	ExplodedBalloon(Vector4f position, DrawList *trailList) :
			trailList(trailList), position(position), alpha(1.0)
	{
		float th = nextFloat() * M_PI;
		float phi = nextFloat() * M_PI * 2;
		direction = Vector4f(sin(th) * cos(phi), sin(th) * sin(phi), cos(th))
				* 2;
	}

	virtual ~ExplodedBalloon();
	virtual bool update(float dt);
	virtual void draw();
};

} /* namespace object */
#endif /* EXPLODEDBALLOON_H_ */
